<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page language="java" pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="s" uri="/struts-tags"%>

<s:if test="#session.Admin != 'Admin'">
	<jsp:forward page="/jsp/login.jsp" />
</s:if>
<s:actionmessage cssClass="note-red" />
<s:actionerror cssClass="note-red" />

<s:form method="post" action="searchFeedback.htm" theme="simple" id="form">
	<table width="100%">
		<tbody>
			<tr>
				<td height="40" colspan="2" class="sectionheading bottom-border">
					Feedback Manager
				</td>
			</tr>
			<tr>
				<td height="8">
				</td>
		</tbody>
	</table>

	<table width="100%">
		<tbody>
			<tr>
				<td colspan="2">
					<b class="verdana12darkgreybold">User Comment</b>
				</td>
			</tr>

			<tr>
				<td colspan="2" class="verdana12blacknormal">
					View and edit the feedback comment left by a user for another user
					on any item.
				</td>

			</tr>
			<tr>
				<td width="25%" align="right" nowrap="nowrap"
					class="verdana12blacknormal">
					Enter Item ID:
				</td>
				<td>
					<s:textfield cssClass="Textfiled-border" name="itemId" size="25"
						value="%{itemId}" />
				</td>
			</tr>
			<tr>

				<td align="right" nowrap="nowrap" class="verdana12blacknormal">
					Enter User ID:
				</td>
				<td>
					<s:textfield cssClass="Textfiled-border" name="userId" size="40"
						value="%{userId}" />
				</td>
			</tr>

			<tr>
				<td align="center" colspan="2">
					<s:submit value="Search" name="Search" type="image"
						src="../Admin-Images/search-btn.gif" theme="simple" />

					<img style="cursor: pointer;"
						onclick="document.getElementById('form').reset();"
						src="../Admin-Images/reset-button.gif" alt="Reset">
				</td>
			</tr>
			<tr>

				<td>
					<b class="verdana12darkgreybold">Users Comment</b>
				</td>
			</tr>
			<tr>
				<td align="right" class="verdana12blacknormal">
					Buyer Comment:
				</td>
				<td>
					<s:textarea cssClass="Textfiled-border" rows="2"
						name="buyerComment" value="%{buyerComment}" cols="65"></s:textarea>
				</td>
			</tr>
			<tr>

				<td align="right" class="verdana12blacknormal">
					Seller Comment:
				</td>
				<td>
					<s:textarea cssClass="Textfiled-border" rows="2"
						name="sellerComment" value="%{sellerComment}" cols="65"></s:textarea>
				</td>
			</tr>
			<tr>
				<td colspan="2" align="center">
					<s:submit type="image" name="saveComment" theme="simple"
						src="../Admin-Images/save-chagnes-button.gif" value="saveComment" />
					<img style="cursor: pointer;"
						onclick="document.getElementById('form').reset();"
						src="../Admin-Images/reset-button.gif" alt="Reset">
				</td>
			</tr>


		</tbody>
	</table>
	<s:hidden name="feedbackId" value="%{feedbackId}" />
</s:form>
<br>


<s:form method="post" action="searchFeedback.htm" name="FeedbackRating"
	theme="simple">

	<table width="100%">
		<tbody>
			<tr>
				<td colspan="2">
					<b class="verdana12darkgreybold">User Rating</b>
				</td>

			</tr>
			<tr>
				<td colspan="2" class="verdana12blacknormal">
					View and edit the feedback rating for a user.
				</td>
			</tr>
			<tr>
				<td align="right" class="verdana12blacknormal">
					Enter User ID:
				</td>
				<td>
					<table cellpadding="0" cellspacing="0">
						<tr>
							<td>
								<input name="RatingUserID" type="text" class="Textfiled-border"
									value="" size="40">
							</td>
							<td align="left">
								&nbsp;
								<s:submit value="Search" name="Search" type="image"
									src="../Admin-Images/search-btn.gif" theme="simple" />
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<b class="verdana12blacknormal">User Rating:</b>
				</td>
			</tr>
			<tr>

				<td align="right" class="verdana12blacknormal">
					Positive:
				</td>
				<td>
					<input name="Positive" type="text" class="Textfiled-border"
						value="" size="20">
				</td>
			</tr>
			<tr>
				<td align="right" class="verdana12blacknormal">
					Neutral:
				</td>
				<td>
					<input name="Neutral" type="text" class="Textfiled-border" value=""
						size="20">
				</td>
			</tr>
			<tr>

				<td align="right" class="verdana12blacknormal">
					Negative:
				</td>
				<td>
					<input name="Negative" type="text" class="Textfiled-border"
						value="" size="20">
				</td>
			</tr>
			<tr align="center">
				<td colspan="2">
					<s:submit type="image" name="saveComment"
						src="../Admin-Images/save-chagnes-button.gif" theme="simple" />
					<img style="cursor: pointer;"
						onclick="document.getElementById('form').reset();"
						src="../Admin-Images/reset-button.gif" alt="Reset">
				</td>
			</tr>

		</tbody>
	</table>
</s:form>

<table id="row" class="verdana12blacknormal Pagination-Table" cellpadding="0" cellspacing="0">
	<tr>
		<td>
			<display:table name="feedbackCountList" pagesize="5" cellpadding="0" cellspacing="0" requestURI="" id="row" class="verdana12blacknormal">
				<display:column title="#" headerClass="Table-Head">
						<c:out value="${row_rowNum}" />
				</display:column>
				<display:column headerClass="Table-Head" property="account" title="Account" autolink="true" />
				<display:column headerClass="Table-Head" property="email" title="Email" autolink="true" />
				<display:column headerClass="Table-Head" property="positive" title="Positive" autolink="true" />
				<display:column headerClass="Table-Head" property="negative" title="Negative" autolink="true" />
				<display:column headerClass="Table-Head" property="neutral" title="Neutral" autolink="true" />
			</display:table>
		</td>
	</tr>
</table>